import config from "@/config"
import http from "@/utils/request"
export default {


	//GetBaseUser
	GetBaseUser: {
		url: `${config.API_URL}/Crm/GetBaseUser`,
		name: "GetBaseUser",
		get: async function(){
			return await http.get(this.url);
		}
	},
	//GetBasePost
	GetBasePost: {
		url: `${config.API_URL}/Crm/GetBasePost`,
		name: "GetBasePost",
		get: async function(){
			return await http.get(this.url);
		}
	},
	//GetBaseDep
	GetBaseDep: {
		url: `${config.API_URL}/Crm/GetBaseDep`,
		name: "GetBaseDep",
		get: async function(){
			return await http.get(this.url);
		}
	},
	//UpPost
	UpPost: {
		url: `${config.API_URL}/Crm/UpPost`,
		name: "UpPost",
		put: async function(id,pid){
			return await http.put(this.url+`/${id}`+`/${pid}`);
		}
	},
	//UpDep
	UpDep: {
		url: `${config.API_URL}/Crm/UpDep`,
		name: "UpDep",
		put: async function(id,did,pid,odid){
			return await http.put(this.url+`/${id}`+`/${did}`+`/${pid}`+`/${odid}`);
		}
	},
	//AddUserByCode
	GetUserInfo: {
		url: `${config.API_URL}/Crm/GetUserInfo`,
		name: "GetUserInfo",
		get: async function(id){
			return await http.get(this.url+`/${id}`);
		}
	},
	//添加用户
	SaveUserInfo: {
		url: `${config.API_URL}/Crm/SaveUserInfo`,
		name: "添加用户",
		headers: {
			'Content-Type': 'application/json'
		},
		post: async function(data){
			return await http.post(this.url,data);
		},

	},
}
